Dog Emotion Classification With YOLO 🐶🦴¶
Imports¶
In [2]:
import numpy as np
import matplotlib.pyplot as plt
import ultralytics
from ultralytics import YOLO
import os
import math
import random
import cv2
ultralytics.checks()
%matplotlib inline
Ultralytics 8.3.140 Python-3.9.21 torch-2.5.1+cu121 CUDA:0 (NVIDIA GeForce RTX 4080, 16376MiB) Setup complete (24 CPUs, 127.8 GB RAM, 1708.8/1863.0 GB disk)
Helper Methods¶
In [3]:
results = {}
# Gets all image files in a directory
def get_all_img_files(directory):
img_files = []
for dirpath, _, filenames in os.walk(directory):
for filename in filenames:
if filename.endswith('.jpg') or filename.endswith('.png') or filename.endswith('.jpeg'):
img_files.append(dirpath + '/' + filename)
return img_files
# Runs predictions and then shows results
def test(model, path, num = 20, fs = 20):
test_image_paths = random.sample(get_all_img_files(path), num)
n = math.ceil(math.sqrt(len(test_image_paths)))
# Set figure size
plt.figure(figsize=(15, 15))
for i, path in enumerate(test_image_paths):
results = model.predict(source=path, save=False, project="predictions", imgsz=img_size)
img_pil = results[0].plot(font_size=fs, pil=True)
# Convert PIL to numpy array
img_np = np.array(img_pil)
img_rgb = cv2.cvtColor(img_np, cv2.COLOR_BGR2RGB)
plt.subplot(n, n, i + 1)
plt.imshow(img_rgb)
plt.axis('off')
plt.title(f"Image {i+1}")
plt.tight_layout()
plt.show()
dataset_path = "C:\\Users\\awast\source\\repos\\dog-emotion-detection-YOLO-model\\data\\dog_dataset_gen_big\\dataset.yaml"
YOLO Model: YOLO11N¶
In [4]:
model_1 = YOLO('yolo11n.pt')
img_size= 640
results['model_1'] = model_1.train(
data=dataset_path,
epochs=2,
batch=12,
verbose=True,
workers=16,
imgsz=img_size,
mosaic=1.0,
hsv_s=1.0,
hsv_v=1.0,
patience=5
)
New https://pypi.org/project/ultralytics/8.3.147 available Update with 'pip install -U ultralytics' Ultralytics 8.3.140 Python-3.9.21 torch-2.5.1+cu121 CUDA:0 (NVIDIA GeForce RTX 4080, 16376MiB) engine\trainer: agnostic_nms=False, amp=True, augment=False, auto_augment=randaugment, batch=12, bgr=0.0, box=7.5, cache=False, cfg=None, classes=None, close_mosaic=10, cls=0.5, conf=None, copy_paste=0.0, copy_paste_mode=flip, cos_lr=False, cutmix=0.0, data=C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\data\dog_dataset_gen_big\dataset.yaml, degrees=0.0, deterministic=True, device=None, dfl=1.5, dnn=False, dropout=0.0, dynamic=False, embed=None, epochs=2, erasing=0.4, exist_ok=False, fliplr=0.5, flipud=0.0, format=torchscript, fraction=1.0, freeze=None, half=False, hsv_h=0.015, hsv_s=1.0, hsv_v=1.0, imgsz=640, int8=False, iou=0.7, keras=False, kobj=1.0, line_width=None, lr0=0.01, lrf=0.01, mask_ratio=4, max_det=300, mixup=0.0, mode=train, model=yolo11n.pt, momentum=0.937, mosaic=1.0, multi_scale=False, name=train12, nbs=64, nms=False, opset=None, optimize=False, optimizer=auto, overlap_mask=True, patience=5, perspective=0.0, plots=True, pose=12.0, pretrained=True, profile=False, project=None, rect=False, resume=False, retina_masks=False, save=True, save_conf=False, save_crop=False, save_dir=runs\detect\train12, save_frames=False, save_json=False, save_period=-1, save_txt=False, scale=0.5, seed=0, shear=0.0, show=False, show_boxes=True, show_conf=True, show_labels=True, simplify=True, single_cls=False, source=None, split=val, stream_buffer=False, task=detect, time=None, tracker=botsort.yaml, translate=0.1, val=True, verbose=True, vid_stride=1, visualize=False, warmup_bias_lr=0.1, warmup_epochs=3.0, warmup_momentum=0.8, weight_decay=0.0005, workers=16, workspace=None Overriding model.yaml nc=80 with nc=8 from n params module arguments 0 -1 1 464 ultralytics.nn.modules.conv.Conv [3, 16, 3, 2] 1 -1 1 4672 ultralytics.nn.modules.conv.Conv [16, 32, 3, 2] 2 -1 1 6640 ultralytics.nn.modules.block.C3k2 [32, 64, 1, False, 0.25] 3 -1 1 36992 ultralytics.nn.modules.conv.Conv [64, 64, 3, 2] 4 -1 1 26080 ultralytics.nn.modules.block.C3k2 [64, 128, 1, False, 0.25] 5 -1 1 147712 ultralytics.nn.modules.conv.Conv [128, 128, 3, 2] 6 -1 1 87040 ultralytics.nn.modules.block.C3k2 [128, 128, 1, True] 7 -1 1 295424 ultralytics.nn.modules.conv.Conv [128, 256, 3, 2] 8 -1 1 346112 ultralytics.nn.modules.block.C3k2 [256, 256, 1, True] 9 -1 1 164608 ultralytics.nn.modules.block.SPPF [256, 256, 5] 10 -1 1 249728 ultralytics.nn.modules.block.C2PSA [256, 256, 1] 11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 12 [-1, 6] 1 0 ultralytics.nn.modules.conv.Concat [1] 13 -1 1 111296 ultralytics.nn.modules.block.C3k2 [384, 128, 1, False] 14 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 15 [-1, 4] 1 0 ultralytics.nn.modules.conv.Concat [1] 16 -1 1 32096 ultralytics.nn.modules.block.C3k2 [256, 64, 1, False] 17 -1 1 36992 ultralytics.nn.modules.conv.Conv [64, 64, 3, 2] 18 [-1, 13] 1 0 ultralytics.nn.modules.conv.Concat [1] 19 -1 1 86720 ultralytics.nn.modules.block.C3k2 [192, 128, 1, False] 20 -1 1 147712 ultralytics.nn.modules.conv.Conv [128, 128, 3, 2] 21 [-1, 10] 1 0 ultralytics.nn.modules.conv.Concat [1] 22 -1 1 378880 ultralytics.nn.modules.block.C3k2 [384, 256, 1, True] 23 [16, 19, 22] 1 432232 ultralytics.nn.modules.head.Detect [8, [64, 128, 256]] YOLO11n summary: 181 layers, 2,591,400 parameters, 2,591,384 gradients, 6.4 GFLOPs Transferred 448/499 items from pretrained weights Freezing layer 'model.23.dfl.conv.weight' AMP: running Automatic Mixed Precision (AMP) checks... AMP: checks passed train: Fast image access (ping: 0.10.0 ms, read: 2469.9653.6 MB/s, size: 530.8 KB)
train: Scanning C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\data\dog_dataset_gen_big\train\labels.cache... 5526 images, 1 backgrounds, 0 corrupt: 100%|██████████| 5527/5527 [00:00<?, ?it/s]
val: Fast image access (ping: 0.30.4 ms, read: 835.8290.9 MB/s, size: 535.5 KB)
val: Scanning C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\data\dog_dataset_gen_big\val\labels.cache... 1184 images, 0 backgrounds, 0 corrupt: 100%|██████████| 1184/1184 [00:00<?, ?it/s]
Plotting labels to runs\detect\train12\labels.jpg... optimizer: 'optimizer=auto' found, ignoring 'lr0=0.01' and 'momentum=0.937' and determining best 'optimizer', 'lr0' and 'momentum' automatically... optimizer: AdamW(lr=0.000833, momentum=0.9) with parameter groups 81 weight(decay=0.0), 88 weight(decay=0.00046875), 87 bias(decay=0.0) Image sizes 640 train, 640 val Using 16 dataloader workers Logging results to runs\detect\train12 Starting training for 2 epochs... Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
1/2 1.72G 1.39 2.874 1.894 19 640: 100%|██████████| 461/461 [00:27<00:00, 16.97it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 50/50 [00:03<00:00, 13.01it/s]
all 1184 1184 0.831 0.729 0.885 0.443
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
2/2 1.91G 1.319 1.862 1.773 21 640: 100%|██████████| 461/461 [00:24<00:00, 18.85it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 50/50 [00:03<00:00, 13.56it/s]
all 1184 1184 0.884 0.852 0.937 0.457
2 epochs completed in 0.017 hours. Optimizer stripped from runs\detect\train12\weights\last.pt, 5.5MB Optimizer stripped from runs\detect\train12\weights\best.pt, 5.5MB Validating runs\detect\train12\weights\best.pt... Ultralytics 8.3.140 Python-3.9.21 torch-2.5.1+cu121 CUDA:0 (NVIDIA GeForce RTX 4080, 16376MiB) YOLO11n summary (fused): 100 layers, 2,583,712 parameters, 0 gradients, 6.3 GFLOPs
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 50/50 [00:04<00:00, 12.26it/s]
all 1184 1184 0.879 0.854 0.936 0.457
anger 164 164 0.992 0.76 0.958 0.461
calmness 144 144 0.882 0.982 0.98 0.442
curiosity 155 155 0.992 0.79 0.986 0.515
excitement 126 126 0.975 0.62 0.954 0.491
fear 170 170 0.963 0.894 0.975 0.486
happiness 120 120 0.515 0.992 0.748 0.375
sadness 150 150 0.779 0.947 0.94 0.403
submissiveness 155 155 0.936 0.846 0.948 0.482
Speed: 0.1ms preprocess, 0.7ms inference, 0.0ms loss, 0.7ms postprocess per image
Results saved to runs\detect\train12
In [5]:
test(model_1, '../data/portraits_dog/', fs=80, num=10)
image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000075.jpg: 448x640 1 happiness, 28.1ms Speed: 1.6ms preprocess, 28.1ms inference, 1.5ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000028.jpg: 448x640 1 submissiveness, 3.4ms Speed: 1.1ms preprocess, 3.4ms inference, 1.2ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000065.jpg: 448x640 (no detections), 3.9ms Speed: 1.0ms preprocess, 3.9ms inference, 0.6ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000018.jpg: 448x640 1 submissiveness, 3.6ms Speed: 2.0ms preprocess, 3.6ms inference, 1.2ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000037.jpg: 544x640 (no detections), 29.2ms Speed: 2.5ms preprocess, 29.2ms inference, 0.5ms postprocess per image at shape (1, 3, 544, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000097.jpg: 448x640 1 submissiveness, 3.9ms Speed: 1.1ms preprocess, 3.9ms inference, 0.9ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000013.jpg: 448x640 1 happiness, 1 submissiveness, 3.5ms Speed: 2.0ms preprocess, 3.5ms inference, 1.0ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000080.jpg: 448x640 1 happiness, 4.1ms Speed: 2.2ms preprocess, 4.1ms inference, 1.3ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000033.jpg: 480x640 1 calmness, 28.7ms Speed: 1.7ms preprocess, 28.7ms inference, 1.1ms postprocess per image at shape (1, 3, 480, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000069.jpg: 480x640 1 calmness, 3.4ms Speed: 1.9ms preprocess, 3.4ms inference, 1.0ms postprocess per image at shape (1, 3, 480, 640)
YOLO Model: YOLO11X¶
In [6]:
model_2 = YOLO('yolo11n.pt')
img_size= 640
results['model_2'] = model_2.train(
data=dataset_path,
epochs=5,
batch=12,
verbose=True,
workers=16,
imgsz=img_size,
patience=5,
mosaic=1.0,
hsv_s=1.0,
hsv_v=1.0
)
New https://pypi.org/project/ultralytics/8.3.147 available Update with 'pip install -U ultralytics' Ultralytics 8.3.140 Python-3.9.21 torch-2.5.1+cu121 CUDA:0 (NVIDIA GeForce RTX 4080, 16376MiB) engine\trainer: agnostic_nms=False, amp=True, augment=False, auto_augment=randaugment, batch=12, bgr=0.0, box=7.5, cache=False, cfg=None, classes=None, close_mosaic=10, cls=0.5, conf=None, copy_paste=0.0, copy_paste_mode=flip, cos_lr=False, cutmix=0.0, data=C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\data\dog_dataset_gen_big\dataset.yaml, degrees=0.0, deterministic=True, device=None, dfl=1.5, dnn=False, dropout=0.0, dynamic=False, embed=None, epochs=5, erasing=0.4, exist_ok=False, fliplr=0.5, flipud=0.0, format=torchscript, fraction=1.0, freeze=None, half=False, hsv_h=0.015, hsv_s=1.0, hsv_v=1.0, imgsz=640, int8=False, iou=0.7, keras=False, kobj=1.0, line_width=None, lr0=0.01, lrf=0.01, mask_ratio=4, max_det=300, mixup=0.0, mode=train, model=yolo11n.pt, momentum=0.937, mosaic=1.0, multi_scale=False, name=train13, nbs=64, nms=False, opset=None, optimize=False, optimizer=auto, overlap_mask=True, patience=5, perspective=0.0, plots=True, pose=12.0, pretrained=True, profile=False, project=None, rect=False, resume=False, retina_masks=False, save=True, save_conf=False, save_crop=False, save_dir=runs\detect\train13, save_frames=False, save_json=False, save_period=-1, save_txt=False, scale=0.5, seed=0, shear=0.0, show=False, show_boxes=True, show_conf=True, show_labels=True, simplify=True, single_cls=False, source=None, split=val, stream_buffer=False, task=detect, time=None, tracker=botsort.yaml, translate=0.1, val=True, verbose=True, vid_stride=1, visualize=False, warmup_bias_lr=0.1, warmup_epochs=3.0, warmup_momentum=0.8, weight_decay=0.0005, workers=16, workspace=None Overriding model.yaml nc=80 with nc=8 from n params module arguments 0 -1 1 464 ultralytics.nn.modules.conv.Conv [3, 16, 3, 2] 1 -1 1 4672 ultralytics.nn.modules.conv.Conv [16, 32, 3, 2] 2 -1 1 6640 ultralytics.nn.modules.block.C3k2 [32, 64, 1, False, 0.25] 3 -1 1 36992 ultralytics.nn.modules.conv.Conv [64, 64, 3, 2] 4 -1 1 26080 ultralytics.nn.modules.block.C3k2 [64, 128, 1, False, 0.25] 5 -1 1 147712 ultralytics.nn.modules.conv.Conv [128, 128, 3, 2] 6 -1 1 87040 ultralytics.nn.modules.block.C3k2 [128, 128, 1, True] 7 -1 1 295424 ultralytics.nn.modules.conv.Conv [128, 256, 3, 2] 8 -1 1 346112 ultralytics.nn.modules.block.C3k2 [256, 256, 1, True] 9 -1 1 164608 ultralytics.nn.modules.block.SPPF [256, 256, 5] 10 -1 1 249728 ultralytics.nn.modules.block.C2PSA [256, 256, 1] 11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 12 [-1, 6] 1 0 ultralytics.nn.modules.conv.Concat [1] 13 -1 1 111296 ultralytics.nn.modules.block.C3k2 [384, 128, 1, False] 14 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 15 [-1, 4] 1 0 ultralytics.nn.modules.conv.Concat [1] 16 -1 1 32096 ultralytics.nn.modules.block.C3k2 [256, 64, 1, False] 17 -1 1 36992 ultralytics.nn.modules.conv.Conv [64, 64, 3, 2] 18 [-1, 13] 1 0 ultralytics.nn.modules.conv.Concat [1] 19 -1 1 86720 ultralytics.nn.modules.block.C3k2 [192, 128, 1, False] 20 -1 1 147712 ultralytics.nn.modules.conv.Conv [128, 128, 3, 2] 21 [-1, 10] 1 0 ultralytics.nn.modules.conv.Concat [1] 22 -1 1 378880 ultralytics.nn.modules.block.C3k2 [384, 256, 1, True] 23 [16, 19, 22] 1 432232 ultralytics.nn.modules.head.Detect [8, [64, 128, 256]] YOLO11n summary: 181 layers, 2,591,400 parameters, 2,591,384 gradients, 6.4 GFLOPs Transferred 448/499 items from pretrained weights Freezing layer 'model.23.dfl.conv.weight' AMP: running Automatic Mixed Precision (AMP) checks... AMP: checks passed train: Fast image access (ping: 0.10.0 ms, read: 2725.5805.6 MB/s, size: 530.8 KB)
train: Scanning C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\data\dog_dataset_gen_big\train\labels.cache... 5526 images, 1 backgrounds, 0 corrupt: 100%|██████████| 5527/5527 [00:00<?, ?it/s]
val: Fast image access (ping: 0.10.0 ms, read: 1376.2297.7 MB/s, size: 535.5 KB)
val: Scanning C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\data\dog_dataset_gen_big\val\labels.cache... 1184 images, 0 backgrounds, 0 corrupt: 100%|██████████| 1184/1184 [00:00<?, ?it/s]
Plotting labels to runs\detect\train13\labels.jpg... optimizer: 'optimizer=auto' found, ignoring 'lr0=0.01' and 'momentum=0.937' and determining best 'optimizer', 'lr0' and 'momentum' automatically... optimizer: AdamW(lr=0.000833, momentum=0.9) with parameter groups 81 weight(decay=0.0), 88 weight(decay=0.00046875), 87 bias(decay=0.0) Image sizes 640 train, 640 val Using 16 dataloader workers Logging results to runs\detect\train13 Starting training for 5 epochs... Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
1/5 1.81G 1.39 2.874 1.894 19 640: 100%|██████████| 461/461 [00:25<00:00, 17.76it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 50/50 [00:03<00:00, 14.07it/s]
all 1184 1184 0.831 0.729 0.885 0.443
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
2/5 1.99G 1.339 1.88 1.793 21 640: 100%|██████████| 461/461 [00:23<00:00, 19.41it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 50/50 [00:03<00:00, 14.46it/s]
all 1184 1184 0.931 0.922 0.956 0.47
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
3/5 1.99G 1.321 1.654 1.769 16 640: 100%|██████████| 461/461 [00:23<00:00, 20.04it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 50/50 [00:03<00:00, 15.16it/s]
all 1184 1184 0.856 0.872 0.919 0.476
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
4/5 1.99G 1.285 1.488 1.731 18 640: 100%|██████████| 461/461 [00:23<00:00, 19.97it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 50/50 [00:03<00:00, 14.93it/s]
all 1184 1184 0.962 0.951 0.989 0.499
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
5/5 1.99G 1.271 1.38 1.718 17 640: 100%|██████████| 461/461 [00:23<00:00, 20.01it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 50/50 [00:03<00:00, 15.06it/s]
all 1184 1184 0.965 0.98 0.987 0.505
5 epochs completed in 0.038 hours. Optimizer stripped from runs\detect\train13\weights\last.pt, 5.5MB Optimizer stripped from runs\detect\train13\weights\best.pt, 5.5MB Validating runs\detect\train13\weights\best.pt... Ultralytics 8.3.140 Python-3.9.21 torch-2.5.1+cu121 CUDA:0 (NVIDIA GeForce RTX 4080, 16376MiB) YOLO11n summary (fused): 100 layers, 2,583,712 parameters, 0 gradients, 6.3 GFLOPs
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 50/50 [00:03<00:00, 13.18it/s]
all 1184 1184 0.965 0.98 0.987 0.505
anger 164 164 0.979 0.988 0.994 0.49
calmness 144 144 0.948 1 0.984 0.518
curiosity 155 155 0.911 1 0.97 0.495
excitement 126 126 0.961 1 0.995 0.514
fear 170 170 0.994 0.952 0.994 0.513
happiness 120 120 0.991 0.95 0.994 0.506
sadness 150 150 0.986 0.948 0.99 0.499
submissiveness 155 155 0.952 1 0.972 0.505
Speed: 0.1ms preprocess, 0.7ms inference, 0.0ms loss, 0.7ms postprocess per image
Results saved to runs\detect\train13
In [7]:
test(model_2, '../data/portraits_dog/', fs=80, num=10)
image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000075.jpg: 448x640 1 curiosity, 4.2ms Speed: 1.1ms preprocess, 4.2ms inference, 1.3ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000028.jpg: 448x640 1 submissiveness, 3.5ms Speed: 1.2ms preprocess, 3.5ms inference, 1.3ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000065.jpg: 448x640 (no detections), 5.3ms Speed: 1.0ms preprocess, 5.3ms inference, 0.8ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000018.jpg: 448x640 1 submissiveness, 3.6ms Speed: 1.6ms preprocess, 3.6ms inference, 1.2ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000037.jpg: 544x640 1 curiosity, 4.6ms Speed: 2.4ms preprocess, 4.6ms inference, 1.0ms postprocess per image at shape (1, 3, 544, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000097.jpg: 448x640 1 submissiveness, 3.9ms Speed: 1.1ms preprocess, 3.9ms inference, 0.9ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000013.jpg: 448x640 1 submissiveness, 3.4ms Speed: 1.8ms preprocess, 3.4ms inference, 0.9ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000080.jpg: 448x640 1 happiness, 3.4ms Speed: 1.7ms preprocess, 3.4ms inference, 0.9ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000033.jpg: 480x640 (no detections), 3.9ms Speed: 1.5ms preprocess, 3.9ms inference, 0.4ms postprocess per image at shape (1, 3, 480, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000069.jpg: 480x640 1 submissiveness, 3.4ms Speed: 1.3ms preprocess, 3.4ms inference, 0.9ms postprocess per image at shape (1, 3, 480, 640)
YOLO Model: YOLO11L-FACE PT Base¶
In [8]:
model_3 = YOLO('yolov11l-face.pt')
img_size= 640
results['model_3'] = model_3.train(
data=dataset_path,
epochs=3,
batch=2,
verbose=True,
workers=16,
imgsz=img_size,
patience=2,
mosaic=1.0,
hsv_s=1.0,
hsv_v=1.0
)
New https://pypi.org/project/ultralytics/8.3.147 available Update with 'pip install -U ultralytics' Ultralytics 8.3.140 Python-3.9.21 torch-2.5.1+cu121 CUDA:0 (NVIDIA GeForce RTX 4080, 16376MiB) engine\trainer: agnostic_nms=False, amp=True, augment=False, auto_augment=randaugment, batch=2, bgr=0.0, box=7.5, cache=False, cfg=None, classes=None, close_mosaic=10, cls=0.5, conf=None, copy_paste=0.0, copy_paste_mode=flip, cos_lr=False, cutmix=0.0, data=C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\data\dog_dataset_gen_big\dataset.yaml, degrees=0.0, deterministic=True, device=None, dfl=1.5, dnn=False, dropout=0.0, dynamic=False, embed=None, epochs=3, erasing=0.4, exist_ok=False, fliplr=0.5, flipud=0.0, format=torchscript, fraction=1.0, freeze=None, half=False, hsv_h=0.015, hsv_s=1.0, hsv_v=1.0, imgsz=640, int8=False, iou=0.7, keras=False, kobj=1.0, line_width=None, lr0=0.01, lrf=0.01, mask_ratio=4, max_det=300, mixup=0.0, mode=train, model=yolov11l-face.pt, momentum=0.937, mosaic=1.0, multi_scale=False, name=train14, nbs=64, nms=False, opset=None, optimize=False, optimizer=auto, overlap_mask=True, patience=2, perspective=0.0, plots=True, pose=12.0, pretrained=True, profile=False, project=None, rect=False, resume=False, retina_masks=False, save=True, save_conf=False, save_crop=False, save_dir=runs\detect\train14, save_frames=False, save_json=False, save_period=-1, save_txt=False, scale=0.5, seed=0, shear=0.0, show=False, show_boxes=True, show_conf=True, show_labels=True, simplify=True, single_cls=False, source=None, split=val, stream_buffer=False, task=detect, time=None, tracker=botsort.yaml, translate=0.1, val=True, verbose=True, vid_stride=1, visualize=False, warmup_bias_lr=0.1, warmup_epochs=3.0, warmup_momentum=0.8, weight_decay=0.0005, workers=16, workspace=None Overriding model.yaml nc=1 with nc=8 from n params module arguments 0 -1 1 1856 ultralytics.nn.modules.conv.Conv [3, 64, 3, 2] 1 -1 1 73984 ultralytics.nn.modules.conv.Conv [64, 128, 3, 2] 2 -1 2 173824 ultralytics.nn.modules.block.C3k2 [128, 256, 2, True, 0.25] 3 -1 1 590336 ultralytics.nn.modules.conv.Conv [256, 256, 3, 2] 4 -1 2 691712 ultralytics.nn.modules.block.C3k2 [256, 512, 2, True, 0.25] 5 -1 1 2360320 ultralytics.nn.modules.conv.Conv [512, 512, 3, 2] 6 -1 2 2234368 ultralytics.nn.modules.block.C3k2 [512, 512, 2, True] 7 -1 1 2360320 ultralytics.nn.modules.conv.Conv [512, 512, 3, 2] 8 -1 2 2234368 ultralytics.nn.modules.block.C3k2 [512, 512, 2, True] 9 -1 1 656896 ultralytics.nn.modules.block.SPPF [512, 512, 5] 10 -1 2 1455616 ultralytics.nn.modules.block.C2PSA [512, 512, 2] 11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 12 [-1, 6] 1 0 ultralytics.nn.modules.conv.Concat [1] 13 -1 2 2496512 ultralytics.nn.modules.block.C3k2 [1024, 512, 2, True] 14 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 15 [-1, 4] 1 0 ultralytics.nn.modules.conv.Concat [1] 16 -1 2 756736 ultralytics.nn.modules.block.C3k2 [1024, 256, 2, True] 17 -1 1 590336 ultralytics.nn.modules.conv.Conv [256, 256, 3, 2] 18 [-1, 13] 1 0 ultralytics.nn.modules.conv.Concat [1] 19 -1 2 2365440 ultralytics.nn.modules.block.C3k2 [768, 512, 2, True] 20 -1 1 2360320 ultralytics.nn.modules.conv.Conv [512, 512, 3, 2] 21 [-1, 10] 1 0 ultralytics.nn.modules.conv.Concat [1] 22 -1 2 2496512 ultralytics.nn.modules.block.C3k2 [1024, 512, 2, True] 23 [16, 19, 22] 1 1417192 ultralytics.nn.modules.head.Detect [8, [256, 512, 512]] YOLO11l summary: 357 layers, 25,316,648 parameters, 25,316,632 gradients, 87.3 GFLOPs Transferred 1009/1015 items from pretrained weights Freezing layer 'model.23.dfl.conv.weight' AMP: running Automatic Mixed Precision (AMP) checks... AMP: checks passed train: Fast image access (ping: 0.10.0 ms, read: 3120.5727.6 MB/s, size: 530.8 KB)
train: Scanning C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\data\dog_dataset_gen_big\train\labels.cache... 5526 images, 1 backgrounds, 0 corrupt: 100%|██████████| 5527/5527 [00:00<?, ?it/s]
val: Fast image access (ping: 0.20.1 ms, read: 891.3237.2 MB/s, size: 535.5 KB)
val: Scanning C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\data\dog_dataset_gen_big\val\labels.cache... 1184 images, 0 backgrounds, 0 corrupt: 100%|██████████| 1184/1184 [00:00<?, ?it/s]
Plotting labels to runs\detect\train14\labels.jpg... optimizer: 'optimizer=auto' found, ignoring 'lr0=0.01' and 'momentum=0.937' and determining best 'optimizer', 'lr0' and 'momentum' automatically... optimizer: AdamW(lr=0.000833, momentum=0.9) with parameter groups 167 weight(decay=0.0), 174 weight(decay=0.0005), 173 bias(decay=0.0) Image sizes 640 train, 640 val Using 16 dataloader workers Logging results to runs\detect\train14 Starting training for 3 epochs... Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
1/3 1.92G 1.553 2.357 2.059 4 640: 100%|██████████| 2764/2764 [02:49<00:00, 16.29it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 296/296 [00:09<00:00, 32.58it/s]
all 1184 1184 0.411 0.822 0.578 0.279
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
2/3 2.13G 1.454 1.86 1.939 4 640: 100%|██████████| 2764/2764 [02:43<00:00, 16.93it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 296/296 [00:09<00:00, 30.52it/s]
all 1184 1184 0.593 0.813 0.771 0.372
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
3/3 2.13G 1.405 1.642 1.884 1 640: 100%|██████████| 2764/2764 [02:37<00:00, 17.58it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 296/296 [00:09<00:00, 31.00it/s]
all 1184 1184 0.884 0.93 0.955 0.478
3 epochs completed in 0.145 hours. Optimizer stripped from runs\detect\train14\weights\last.pt, 51.2MB Optimizer stripped from runs\detect\train14\weights\best.pt, 51.2MB Validating runs\detect\train14\weights\best.pt... Ultralytics 8.3.140 Python-3.9.21 torch-2.5.1+cu121 CUDA:0 (NVIDIA GeForce RTX 4080, 16376MiB) YOLO11l summary (fused): 190 layers, 25,285,480 parameters, 0 gradients, 86.6 GFLOPs
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 296/296 [00:07<00:00, 41.29it/s]
all 1184 1184 0.884 0.929 0.955 0.478
anger 164 164 0.969 0.773 0.96 0.465
calmness 144 144 0.815 1 0.982 0.478
curiosity 155 155 0.883 0.973 0.96 0.497
excitement 126 126 0.893 0.992 0.938 0.438
fear 170 170 0.749 0.906 0.923 0.461
happiness 120 120 0.899 0.867 0.922 0.47
sadness 150 150 0.941 0.953 0.977 0.501
submissiveness 155 155 0.921 0.972 0.979 0.514
Speed: 0.2ms preprocess, 3.5ms inference, 0.0ms loss, 0.7ms postprocess per image
Results saved to runs\detect\train14
In [9]:
test(model_3, '../data/portraits_dog/', fs=80, num=10)
image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000075.jpg: 448x640 1 submissiveness, 28.1ms Speed: 1.4ms preprocess, 28.1ms inference, 1.2ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000028.jpg: 448x640 1 excitement, 7.9ms Speed: 1.2ms preprocess, 7.9ms inference, 1.7ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000065.jpg: 448x640 1 anger, 6.6ms Speed: 1.3ms preprocess, 6.6ms inference, 1.4ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000018.jpg: 448x640 1 submissiveness, 7.4ms Speed: 2.0ms preprocess, 7.4ms inference, 4.2ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000037.jpg: 544x640 (no detections), 27.0ms Speed: 2.6ms preprocess, 27.0ms inference, 0.4ms postprocess per image at shape (1, 3, 544, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000097.jpg: 448x640 1 submissiveness, 14.1ms Speed: 1.2ms preprocess, 14.1ms inference, 1.1ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000013.jpg: 448x640 1 submissiveness, 11.6ms Speed: 2.1ms preprocess, 11.6ms inference, 1.1ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000080.jpg: 448x640 1 happiness, 10.8ms Speed: 2.6ms preprocess, 10.8ms inference, 1.1ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000033.jpg: 480x640 1 sadness, 28.7ms Speed: 1.9ms preprocess, 28.7ms inference, 1.7ms postprocess per image at shape (1, 3, 480, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000069.jpg: 480x640 1 submissiveness, 11.4ms Speed: 2.2ms preprocess, 11.4ms inference, 2.0ms postprocess per image at shape (1, 3, 480, 640)
YOLO Model: YOLO11L-FACE PT Medium¶
In [10]:
model_4 = YOLO('yolov11l-face.pt')
img_size= 640
results['model_4'] = model_4.train(
data=dataset_path,
epochs=5,
batch=16,
verbose=True,
workers=16,
imgsz=img_size,
patience=5,
mosaic=1.0,
hsv_s=1.0,
hsv_v=1.0,
)
New https://pypi.org/project/ultralytics/8.3.147 available Update with 'pip install -U ultralytics' Ultralytics 8.3.140 Python-3.9.21 torch-2.5.1+cu121 CUDA:0 (NVIDIA GeForce RTX 4080, 16376MiB) engine\trainer: agnostic_nms=False, amp=True, augment=False, auto_augment=randaugment, batch=16, bgr=0.0, box=7.5, cache=False, cfg=None, classes=None, close_mosaic=10, cls=0.5, conf=None, copy_paste=0.0, copy_paste_mode=flip, cos_lr=False, cutmix=0.0, data=C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\data\dog_dataset_gen_big\dataset.yaml, degrees=0.0, deterministic=True, device=None, dfl=1.5, dnn=False, dropout=0.0, dynamic=False, embed=None, epochs=5, erasing=0.4, exist_ok=False, fliplr=0.5, flipud=0.0, format=torchscript, fraction=1.0, freeze=None, half=False, hsv_h=0.015, hsv_s=1.0, hsv_v=1.0, imgsz=640, int8=False, iou=0.7, keras=False, kobj=1.0, line_width=None, lr0=0.01, lrf=0.01, mask_ratio=4, max_det=300, mixup=0.0, mode=train, model=yolov11l-face.pt, momentum=0.937, mosaic=1.0, multi_scale=False, name=train15, nbs=64, nms=False, opset=None, optimize=False, optimizer=auto, overlap_mask=True, patience=5, perspective=0.0, plots=True, pose=12.0, pretrained=True, profile=False, project=None, rect=False, resume=False, retina_masks=False, save=True, save_conf=False, save_crop=False, save_dir=runs\detect\train15, save_frames=False, save_json=False, save_period=-1, save_txt=False, scale=0.5, seed=0, shear=0.0, show=False, show_boxes=True, show_conf=True, show_labels=True, simplify=True, single_cls=False, source=None, split=val, stream_buffer=False, task=detect, time=None, tracker=botsort.yaml, translate=0.1, val=True, verbose=True, vid_stride=1, visualize=False, warmup_bias_lr=0.1, warmup_epochs=3.0, warmup_momentum=0.8, weight_decay=0.0005, workers=16, workspace=None Overriding model.yaml nc=1 with nc=8 from n params module arguments 0 -1 1 1856 ultralytics.nn.modules.conv.Conv [3, 64, 3, 2] 1 -1 1 73984 ultralytics.nn.modules.conv.Conv [64, 128, 3, 2] 2 -1 2 173824 ultralytics.nn.modules.block.C3k2 [128, 256, 2, True, 0.25] 3 -1 1 590336 ultralytics.nn.modules.conv.Conv [256, 256, 3, 2] 4 -1 2 691712 ultralytics.nn.modules.block.C3k2 [256, 512, 2, True, 0.25] 5 -1 1 2360320 ultralytics.nn.modules.conv.Conv [512, 512, 3, 2] 6 -1 2 2234368 ultralytics.nn.modules.block.C3k2 [512, 512, 2, True] 7 -1 1 2360320 ultralytics.nn.modules.conv.Conv [512, 512, 3, 2] 8 -1 2 2234368 ultralytics.nn.modules.block.C3k2 [512, 512, 2, True] 9 -1 1 656896 ultralytics.nn.modules.block.SPPF [512, 512, 5] 10 -1 2 1455616 ultralytics.nn.modules.block.C2PSA [512, 512, 2] 11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 12 [-1, 6] 1 0 ultralytics.nn.modules.conv.Concat [1] 13 -1 2 2496512 ultralytics.nn.modules.block.C3k2 [1024, 512, 2, True] 14 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 15 [-1, 4] 1 0 ultralytics.nn.modules.conv.Concat [1] 16 -1 2 756736 ultralytics.nn.modules.block.C3k2 [1024, 256, 2, True] 17 -1 1 590336 ultralytics.nn.modules.conv.Conv [256, 256, 3, 2] 18 [-1, 13] 1 0 ultralytics.nn.modules.conv.Concat [1] 19 -1 2 2365440 ultralytics.nn.modules.block.C3k2 [768, 512, 2, True] 20 -1 1 2360320 ultralytics.nn.modules.conv.Conv [512, 512, 3, 2] 21 [-1, 10] 1 0 ultralytics.nn.modules.conv.Concat [1] 22 -1 2 2496512 ultralytics.nn.modules.block.C3k2 [1024, 512, 2, True] 23 [16, 19, 22] 1 1417192 ultralytics.nn.modules.head.Detect [8, [256, 512, 512]] YOLO11l summary: 357 layers, 25,316,648 parameters, 25,316,632 gradients, 87.3 GFLOPs Transferred 1009/1015 items from pretrained weights Freezing layer 'model.23.dfl.conv.weight' AMP: running Automatic Mixed Precision (AMP) checks... AMP: checks passed train: Fast image access (ping: 0.10.0 ms, read: 2588.9418.8 MB/s, size: 530.8 KB)
train: Scanning C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\data\dog_dataset_gen_big\train\labels.cache... 5526 images, 1 backgrounds, 0 corrupt: 100%|██████████| 5527/5527 [00:00<?, ?it/s]
val: Fast image access (ping: 1.32.6 ms, read: 1017.0319.7 MB/s, size: 535.5 KB)
val: Scanning C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\data\dog_dataset_gen_big\val\labels.cache... 1184 images, 0 backgrounds, 0 corrupt: 100%|██████████| 1184/1184 [00:00<?, ?it/s]
Plotting labels to runs\detect\train15\labels.jpg... optimizer: 'optimizer=auto' found, ignoring 'lr0=0.01' and 'momentum=0.937' and determining best 'optimizer', 'lr0' and 'momentum' automatically... optimizer: AdamW(lr=0.000833, momentum=0.9) with parameter groups 167 weight(decay=0.0), 174 weight(decay=0.0005), 173 bias(decay=0.0) Image sizes 640 train, 640 val Using 16 dataloader workers Logging results to runs\detect\train15 Starting training for 5 epochs... Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
1/5 10.7G 1.476 2.37 1.957 16 640: 100%|██████████| 346/346 [01:22<00:00, 4.21it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 37/37 [00:07<00:00, 5.21it/s]
all 1184 1184 0.548 0.708 0.705 0.351
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
2/5 10.9G 1.436 1.593 1.88 18 640: 100%|██████████| 346/346 [01:17<00:00, 4.45it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 37/37 [00:06<00:00, 5.31it/s]
all 1184 1184 0.862 0.877 0.934 0.437
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
3/5 10.9G 1.418 1.431 1.851 22 640: 100%|██████████| 346/346 [01:13<00:00, 4.68it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 37/37 [00:06<00:00, 5.33it/s]
all 1184 1184 0.936 0.925 0.977 0.497
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
4/5 10.9G 1.38 1.312 1.81 16 640: 100%|██████████| 346/346 [01:13<00:00, 4.70it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 37/37 [00:06<00:00, 5.31it/s]
all 1184 1184 0.96 0.961 0.99 0.529
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
5/5 10.9G 1.334 1.228 1.775 23 640: 100%|██████████| 346/346 [01:13<00:00, 4.69it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 37/37 [00:06<00:00, 5.33it/s]
all 1184 1184 0.966 0.985 0.991 0.529
5 epochs completed in 0.117 hours. Optimizer stripped from runs\detect\train15\weights\last.pt, 51.2MB Optimizer stripped from runs\detect\train15\weights\best.pt, 51.2MB Validating runs\detect\train15\weights\best.pt... Ultralytics 8.3.140 Python-3.9.21 torch-2.5.1+cu121 CUDA:0 (NVIDIA GeForce RTX 4080, 16376MiB) YOLO11l summary (fused): 190 layers, 25,285,480 parameters, 0 gradients, 86.6 GFLOPs
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 37/37 [00:06<00:00, 5.45it/s]
all 1184 1184 0.96 0.961 0.99 0.53
anger 164 164 0.994 0.964 0.993 0.532
calmness 144 144 0.986 0.983 0.995 0.521
curiosity 155 155 0.987 0.981 0.994 0.538
excitement 126 126 0.915 0.96 0.985 0.531
fear 170 170 0.993 0.86 0.993 0.542
happiness 120 120 0.907 0.972 0.974 0.513
sadness 150 150 0.952 0.987 0.993 0.511
submissiveness 155 155 0.944 0.984 0.993 0.549
Speed: 0.1ms preprocess, 3.5ms inference, 0.0ms loss, 0.6ms postprocess per image
Results saved to runs\detect\train15
In [11]:
test(model_4, '../data/portraits_dog/', fs=80, num=10)
image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000075.jpg: 448x640 1 curiosity, 1 submissiveness, 8.9ms Speed: 1.2ms preprocess, 8.9ms inference, 1.1ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000028.jpg: 448x640 1 excitement, 1 submissiveness, 8.7ms Speed: 1.2ms preprocess, 8.7ms inference, 1.0ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000065.jpg: 448x640 1 happiness, 6.3ms Speed: 1.1ms preprocess, 6.3ms inference, 1.0ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000018.jpg: 448x640 (no detections), 6.3ms Speed: 1.6ms preprocess, 6.3ms inference, 0.5ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000037.jpg: 544x640 1 curiosity, 1 happiness, 7.8ms Speed: 2.5ms preprocess, 7.8ms inference, 1.2ms postprocess per image at shape (1, 3, 544, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000097.jpg: 448x640 1 submissiveness, 6.6ms Speed: 1.1ms preprocess, 6.6ms inference, 0.9ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000013.jpg: 448x640 1 submissiveness, 6.1ms Speed: 2.1ms preprocess, 6.1ms inference, 1.4ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000080.jpg: 448x640 1 happiness, 6.4ms Speed: 1.9ms preprocess, 6.4ms inference, 1.0ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000033.jpg: 480x640 1 calmness, 7.0ms Speed: 1.6ms preprocess, 7.0ms inference, 1.2ms postprocess per image at shape (1, 3, 480, 640) image 1/1 C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\notebooks\..\data\portraits_dog\000069.jpg: 480x640 1 submissiveness, 6.4ms Speed: 1.4ms preprocess, 6.4ms inference, 1.0ms postprocess per image at shape (1, 3, 480, 640)
Champion YOLO Model: YOLO11L-FACE PT Large¶
In [12]:
model = YOLO('yolov11l-face.pt')
img_size= 640
results['model_champion'] = model.train(
data=dataset_path,
epochs=8,
batch=16,
verbose=True,
workers=16,
imgsz=img_size,
patience=5,
mosaic=1.0
)
New https://pypi.org/project/ultralytics/8.3.147 available Update with 'pip install -U ultralytics' Ultralytics 8.3.140 Python-3.9.21 torch-2.5.1+cu121 CUDA:0 (NVIDIA GeForce RTX 4080, 16376MiB) engine\trainer: agnostic_nms=False, amp=True, augment=False, auto_augment=randaugment, batch=16, bgr=0.0, box=7.5, cache=False, cfg=None, classes=None, close_mosaic=10, cls=0.5, conf=None, copy_paste=0.0, copy_paste_mode=flip, cos_lr=False, cutmix=0.0, data=C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\data\dog_dataset_gen_big\dataset.yaml, degrees=0.0, deterministic=True, device=None, dfl=1.5, dnn=False, dropout=0.0, dynamic=False, embed=None, epochs=8, erasing=0.4, exist_ok=False, fliplr=0.5, flipud=0.0, format=torchscript, fraction=1.0, freeze=None, half=False, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, imgsz=640, int8=False, iou=0.7, keras=False, kobj=1.0, line_width=None, lr0=0.01, lrf=0.01, mask_ratio=4, max_det=300, mixup=0.0, mode=train, model=yolov11l-face.pt, momentum=0.937, mosaic=1.0, multi_scale=False, name=train16, nbs=64, nms=False, opset=None, optimize=False, optimizer=auto, overlap_mask=True, patience=5, perspective=0.0, plots=True, pose=12.0, pretrained=True, profile=False, project=None, rect=False, resume=False, retina_masks=False, save=True, save_conf=False, save_crop=False, save_dir=runs\detect\train16, save_frames=False, save_json=False, save_period=-1, save_txt=False, scale=0.5, seed=0, shear=0.0, show=False, show_boxes=True, show_conf=True, show_labels=True, simplify=True, single_cls=False, source=None, split=val, stream_buffer=False, task=detect, time=None, tracker=botsort.yaml, translate=0.1, val=True, verbose=True, vid_stride=1, visualize=False, warmup_bias_lr=0.1, warmup_epochs=3.0, warmup_momentum=0.8, weight_decay=0.0005, workers=16, workspace=None Overriding model.yaml nc=1 with nc=8 from n params module arguments 0 -1 1 1856 ultralytics.nn.modules.conv.Conv [3, 64, 3, 2] 1 -1 1 73984 ultralytics.nn.modules.conv.Conv [64, 128, 3, 2] 2 -1 2 173824 ultralytics.nn.modules.block.C3k2 [128, 256, 2, True, 0.25] 3 -1 1 590336 ultralytics.nn.modules.conv.Conv [256, 256, 3, 2] 4 -1 2 691712 ultralytics.nn.modules.block.C3k2 [256, 512, 2, True, 0.25] 5 -1 1 2360320 ultralytics.nn.modules.conv.Conv [512, 512, 3, 2] 6 -1 2 2234368 ultralytics.nn.modules.block.C3k2 [512, 512, 2, True] 7 -1 1 2360320 ultralytics.nn.modules.conv.Conv [512, 512, 3, 2] 8 -1 2 2234368 ultralytics.nn.modules.block.C3k2 [512, 512, 2, True] 9 -1 1 656896 ultralytics.nn.modules.block.SPPF [512, 512, 5] 10 -1 2 1455616 ultralytics.nn.modules.block.C2PSA [512, 512, 2] 11 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 12 [-1, 6] 1 0 ultralytics.nn.modules.conv.Concat [1] 13 -1 2 2496512 ultralytics.nn.modules.block.C3k2 [1024, 512, 2, True] 14 -1 1 0 torch.nn.modules.upsampling.Upsample [None, 2, 'nearest'] 15 [-1, 4] 1 0 ultralytics.nn.modules.conv.Concat [1] 16 -1 2 756736 ultralytics.nn.modules.block.C3k2 [1024, 256, 2, True] 17 -1 1 590336 ultralytics.nn.modules.conv.Conv [256, 256, 3, 2] 18 [-1, 13] 1 0 ultralytics.nn.modules.conv.Concat [1] 19 -1 2 2365440 ultralytics.nn.modules.block.C3k2 [768, 512, 2, True] 20 -1 1 2360320 ultralytics.nn.modules.conv.Conv [512, 512, 3, 2] 21 [-1, 10] 1 0 ultralytics.nn.modules.conv.Concat [1] 22 -1 2 2496512 ultralytics.nn.modules.block.C3k2 [1024, 512, 2, True] 23 [16, 19, 22] 1 1417192 ultralytics.nn.modules.head.Detect [8, [256, 512, 512]] YOLO11l summary: 357 layers, 25,316,648 parameters, 25,316,632 gradients, 87.3 GFLOPs Transferred 1009/1015 items from pretrained weights Freezing layer 'model.23.dfl.conv.weight' AMP: running Automatic Mixed Precision (AMP) checks... AMP: checks passed train: Fast image access (ping: 0.10.0 ms, read: 2354.8435.7 MB/s, size: 530.8 KB)
train: Scanning C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\data\dog_dataset_gen_big\train\labels.cache... 5526 images, 1 backgrounds, 0 corrupt: 100%|██████████| 5527/5527 [00:00<?, ?it/s]
val: Fast image access (ping: 0.20.1 ms, read: 803.4537.3 MB/s, size: 535.5 KB)
val: Scanning C:\Users\awast\source\repos\dog-emotion-detection-YOLO-model\data\dog_dataset_gen_big\val\labels.cache... 1184 images, 0 backgrounds, 0 corrupt: 100%|██████████| 1184/1184 [00:00<?, ?it/s]
Plotting labels to runs\detect\train16\labels.jpg... optimizer: 'optimizer=auto' found, ignoring 'lr0=0.01' and 'momentum=0.937' and determining best 'optimizer', 'lr0' and 'momentum' automatically... optimizer: AdamW(lr=0.000833, momentum=0.9) with parameter groups 167 weight(decay=0.0), 174 weight(decay=0.0005), 173 bias(decay=0.0) Image sizes 640 train, 640 val Using 16 dataloader workers Logging results to runs\detect\train16 Starting training for 8 epochs... Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
1/8 11.3G 1.465 2.283 1.948 16 640: 100%|██████████| 346/346 [01:25<00:00, 4.05it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 37/37 [00:07<00:00, 4.94it/s]
all 1184 1184 0.632 0.76 0.85 0.42
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
2/8 11.5G 1.434 1.521 1.876 18 640: 100%|██████████| 346/346 [01:16<00:00, 4.54it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 37/37 [00:07<00:00, 4.77it/s]
all 1184 1184 0.834 0.846 0.93 0.476
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
3/8 11.5G 1.415 1.4 1.846 22 640: 100%|██████████| 346/346 [01:15<00:00, 4.59it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 37/37 [00:07<00:00, 4.88it/s]
all 1184 1184 0.927 0.897 0.976 0.502
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
4/8 11.5G 1.396 1.298 1.821 16 640: 100%|██████████| 346/346 [01:13<00:00, 4.70it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 37/37 [00:06<00:00, 5.38it/s]
all 1184 1184 0.975 0.982 0.992 0.512
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
5/8 11.4G 1.355 1.236 1.791 23 640: 100%|██████████| 346/346 [01:09<00:00, 4.99it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 37/37 [00:06<00:00, 5.70it/s]
all 1184 1184 0.958 0.971 0.988 0.522
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
6/8 11.5G 1.346 1.179 1.774 21 640: 100%|██████████| 346/346 [01:09<00:00, 4.99it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 37/37 [00:06<00:00, 5.72it/s]
all 1184 1184 0.978 0.948 0.985 0.527
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
7/8 11.4G 1.32 1.141 1.758 16 640: 100%|██████████| 346/346 [01:09<00:00, 5.00it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 37/37 [00:06<00:00, 5.74it/s]
all 1184 1184 0.98 0.986 0.994 0.537
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
8/8 11.5G 1.298 1.104 1.738 14 640: 100%|██████████| 346/346 [01:09<00:00, 4.99it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 37/37 [00:06<00:00, 5.68it/s]
all 1184 1184 0.992 0.987 0.995 0.54
8 epochs completed in 0.181 hours. Optimizer stripped from runs\detect\train16\weights\last.pt, 51.2MB Optimizer stripped from runs\detect\train16\weights\best.pt, 51.2MB Validating runs\detect\train16\weights\best.pt... Ultralytics 8.3.140 Python-3.9.21 torch-2.5.1+cu121 CUDA:0 (NVIDIA GeForce RTX 4080, 16376MiB) YOLO11l summary (fused): 190 layers, 25,285,480 parameters, 0 gradients, 86.6 GFLOPs
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 37/37 [00:06<00:00, 5.77it/s]
all 1184 1184 0.992 0.987 0.995 0.541
anger 164 164 1 0.983 0.995 0.538
calmness 144 144 0.986 0.984 0.995 0.53
curiosity 155 155 0.998 1 0.995 0.547
excitement 126 126 1 0.965 0.995 0.538
fear 170 170 0.998 0.988 0.995 0.544
happiness 120 120 0.963 0.992 0.993 0.531
sadness 150 150 0.993 0.984 0.995 0.547
submissiveness 155 155 0.998 1 0.995 0.551
Speed: 0.1ms preprocess, 3.3ms inference, 0.0ms loss, 0.6ms postprocess per image
Results saved to runs\detect\train16
In [13]:
test('../data/dog_dataset_gen_big/test/images/', 50, 80)
image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\443_curly_anger_young_brown.png: 640x640 1 anger, 36.5ms Speed: 1.5ms preprocess, 36.5ms inference, 1.7ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\890_curly_sadness_old_brown.png: 640x640 1 sadness, 165.2ms Speed: 3.0ms preprocess, 165.2ms inference, 1.6ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\318_short-hair_sadness_young_white.png: 640x640 1 sadness, 9.4ms Speed: 1.5ms preprocess, 9.4ms inference, 1.1ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\539_short-hair_curiosity_young_brown.png: 640x640 1 curiosity, 7.3ms Speed: 1.6ms preprocess, 7.3ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\31_furry_calmness_young_white.png: 640x640 1 calmness, 6.8ms Speed: 5.3ms preprocess, 6.8ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\253_curly_sadness_middle-aged_brown.png: 640x640 1 sadness, 8.4ms Speed: 1.6ms preprocess, 8.4ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\496_curly_curiosity_middle-aged_brown.png: 640x640 1 curiosity, 7.4ms Speed: 1.8ms preprocess, 7.4ms inference, 1.9ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\926_furry_sadness_old_brown.png: 640x640 1 sadness, 7.1ms Speed: 1.6ms preprocess, 7.1ms inference, 1.2ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\327_short-hair_fear_young_brown.png: 640x640 1 fear, 8.3ms Speed: 1.6ms preprocess, 8.3ms inference, 1.1ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\586_long-hair_calmness_old_black.png: 640x640 1 calmness, 7.7ms Speed: 1.6ms preprocess, 7.7ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\258_curly_calmness_young_black.png: 640x640 1 calmness, 8.0ms Speed: 1.6ms preprocess, 8.0ms inference, 1.4ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\219_curly_curiosity_young_white.png: 640x640 1 curiosity, 7.3ms Speed: 1.6ms preprocess, 7.3ms inference, 1.5ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\620_long-hair_calmness_middle-aged_white.png: 640x640 1 calmness, 7.1ms Speed: 1.6ms preprocess, 7.1ms inference, 1.4ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\844_long-hair_excitement_young_black.png: 640x640 1 excitement, 7.8ms Speed: 1.5ms preprocess, 7.8ms inference, 1.1ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\970_furry_sadness_old_black.png: 640x640 1 sadness, 7.6ms Speed: 1.6ms preprocess, 7.6ms inference, 1.3ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\25_long-hair_curiosity_middle-aged_black.png: 640x640 1 curiosity, 7.8ms Speed: 1.5ms preprocess, 7.8ms inference, 1.2ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\653_furry_curiosity_old_black.png: 640x640 1 curiosity, 8.0ms Speed: 1.6ms preprocess, 8.0ms inference, 1.5ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\789_furry_curiosity_middle-aged_brown.png: 640x640 1 curiosity, 7.6ms Speed: 1.6ms preprocess, 7.6ms inference, 1.2ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\594_long-hair_anger_young_brown.png: 640x640 1 anger, 9.7ms Speed: 1.6ms preprocess, 9.7ms inference, 0.9ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\415_short-hair_excitement_young_black.png: 640x640 1 excitement, 7.8ms Speed: 1.8ms preprocess, 7.8ms inference, 1.1ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\954_long-hair_curiosity_old_white.png: 640x640 1 curiosity, 7.1ms Speed: 1.7ms preprocess, 7.1ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\853_short-hair_submissiveness_old_brown.png: 640x640 1 submissiveness, 7.1ms Speed: 1.6ms preprocess, 7.1ms inference, 1.1ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\802_short-hair_excitement_middle-aged_brown.png: 640x640 1 excitement, 7.3ms Speed: 1.7ms preprocess, 7.3ms inference, 1.2ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\909_curly_fear_middle-aged_black.png: 640x640 1 fear, 11.0ms Speed: 1.7ms preprocess, 11.0ms inference, 1.4ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\509_long-hair_fear_middle-aged_white.png: 640x640 1 fear, 7.1ms Speed: 1.6ms preprocess, 7.1ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\1_short-hair_happiness_middle-aged_brown.png: 640x640 1 happiness, 7.8ms Speed: 1.6ms preprocess, 7.8ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\949_short-hair_submissiveness_middle-aged_brown.png: 640x640 1 submissiveness, 7.5ms Speed: 1.7ms preprocess, 7.5ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\119_curly_sadness_middle-aged_brown.png: 640x640 1 sadness, 7.5ms Speed: 1.6ms preprocess, 7.5ms inference, 1.1ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\250_furry_submissiveness_middle-aged_black.png: 640x640 1 submissiveness, 7.7ms Speed: 1.6ms preprocess, 7.7ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\725_long-hair_sadness_middle-aged_black.png: 640x640 1 sadness, 7.7ms Speed: 1.7ms preprocess, 7.7ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\100_short-hair_sadness_young_brown.png: 640x640 1 sadness, 7.3ms Speed: 1.5ms preprocess, 7.3ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\879_short-hair_fear_middle-aged_black.png: 640x640 1 fear, 6.5ms Speed: 1.6ms preprocess, 6.5ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\625_short-hair_happiness_old_brown.png: 640x640 1 happiness, 7.5ms Speed: 1.8ms preprocess, 7.5ms inference, 1.1ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\486_curly_excitement_middle-aged_brown.png: 640x640 1 excitement, 6.5ms Speed: 1.6ms preprocess, 6.5ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\608_curly_fear_middle-aged_white.png: 640x640 1 fear, 6.4ms Speed: 1.6ms preprocess, 6.4ms inference, 1.2ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\200_long-hair_fear_middle-aged_white.png: 640x640 1 fear, 7.3ms Speed: 1.6ms preprocess, 7.3ms inference, 1.3ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\392_furry_anger_young_white.png: 640x640 1 anger, 6.9ms Speed: 1.8ms preprocess, 6.9ms inference, 1.5ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\985_long-hair_excitement_old_white.png: 640x640 1 excitement, 7.8ms Speed: 1.6ms preprocess, 7.8ms inference, 1.4ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\447_short-hair_calmness_middle-aged_brown.png: 640x640 1 calmness, 7.0ms Speed: 1.5ms preprocess, 7.0ms inference, 1.1ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\478_short-hair_happiness_old_black.png: 640x640 1 happiness, 7.2ms Speed: 1.6ms preprocess, 7.2ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\321_short-hair_excitement_middle-aged_black.png: 640x640 1 excitement, 7.4ms Speed: 1.9ms preprocess, 7.4ms inference, 1.2ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\941_short-hair_calmness_old_black.png: 640x640 1 calmness, 7.4ms Speed: 1.6ms preprocess, 7.4ms inference, 1.2ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\808_short-hair_fear_old_black.png: 640x640 1 fear, 7.0ms Speed: 1.5ms preprocess, 7.0ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\248_furry_excitement_young_black.png: 640x640 1 excitement, 6.9ms Speed: 1.6ms preprocess, 6.9ms inference, 1.4ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\229_long-hair_happiness_young_white.png: 640x640 1 happiness, 7.7ms Speed: 1.6ms preprocess, 7.7ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\59_furry_calmness_old_white.png: 640x640 1 calmness, 6.8ms Speed: 1.6ms preprocess, 6.8ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\892_long-hair_submissiveness_young_white.png: 640x640 1 submissiveness, 6.8ms Speed: 1.6ms preprocess, 6.8ms inference, 1.1ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\875_curly_submissiveness_old_white.png: 640x640 1 submissiveness, 7.4ms Speed: 1.8ms preprocess, 7.4ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\274_short-hair_calmness_young_white.png: 640x640 1 calmness, 7.0ms Speed: 1.9ms preprocess, 7.0ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\dog_dataset_gen_big\test\images\572_long-hair_submissiveness_young_white.png: 640x640 1 submissiveness, 7.0ms Speed: 2.0ms preprocess, 7.0ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640)
Testing On Real World Data¶
In [16]:
test('../data/portraits_dog/', fs=80, num=70)
image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000046.jpg: 448x640 (no detections), 7.1ms Speed: 1.9ms preprocess, 7.1ms inference, 0.4ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000050.jpg: 448x640 1 submissiveness, 6.2ms Speed: 1.8ms preprocess, 6.2ms inference, 0.9ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000085.jpg: 448x640 1 submissiveness, 6.8ms Speed: 1.3ms preprocess, 6.8ms inference, 1.0ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000033.jpg: 480x640 1 calmness, 6.9ms Speed: 1.5ms preprocess, 6.9ms inference, 1.0ms postprocess per image at shape (1, 3, 480, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000020.jpg: 512x640 1 submissiveness, 7.0ms Speed: 1.7ms preprocess, 7.0ms inference, 1.1ms postprocess per image at shape (1, 3, 512, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000072.jpg: 448x640 1 submissiveness, 7.1ms Speed: 2.1ms preprocess, 7.1ms inference, 0.9ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000089.jpg: 448x640 1 submissiveness, 6.4ms Speed: 1.7ms preprocess, 6.4ms inference, 1.1ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000002.jpg: 352x640 (no detections), 7.6ms Speed: 1.4ms preprocess, 7.6ms inference, 0.4ms postprocess per image at shape (1, 3, 352, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000059.jpg: 640x448 1 curiosity, 7.2ms Speed: 1.2ms preprocess, 7.2ms inference, 0.9ms postprocess per image at shape (1, 3, 640, 448) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000011.jpg: 480x640 (no detections), 6.8ms Speed: 1.6ms preprocess, 6.8ms inference, 0.4ms postprocess per image at shape (1, 3, 480, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000043.jpg: 448x640 2 submissivenesss, 6.6ms Speed: 1.2ms preprocess, 6.6ms inference, 0.9ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000006.jpg: 480x640 1 happiness, 7.2ms Speed: 1.2ms preprocess, 7.2ms inference, 1.2ms postprocess per image at shape (1, 3, 480, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000070.jpg: 480x640 1 calmness, 7.1ms Speed: 1.4ms preprocess, 7.1ms inference, 1.0ms postprocess per image at shape (1, 3, 480, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000036.jpg: 384x640 1 submissiveness, 7.0ms Speed: 1.2ms preprocess, 7.0ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000018.jpg: 448x640 (no detections), 6.8ms Speed: 1.6ms preprocess, 6.8ms inference, 0.6ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000031.jpg: 448x640 (no detections), 6.1ms Speed: 1.9ms preprocess, 6.1ms inference, 0.5ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000062.jpg: 512x640 1 submissiveness, 6.7ms Speed: 1.3ms preprocess, 6.7ms inference, 0.9ms postprocess per image at shape (1, 3, 512, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000100.jpg: 576x640 1 curiosity, 7.9ms Speed: 2.1ms preprocess, 7.9ms inference, 0.9ms postprocess per image at shape (1, 3, 576, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000079.jpg: 448x640 1 submissiveness, 6.9ms Speed: 1.1ms preprocess, 6.9ms inference, 0.9ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000037.jpg: 544x640 1 happiness, 7.3ms Speed: 2.3ms preprocess, 7.3ms inference, 0.9ms postprocess per image at shape (1, 3, 544, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000083.jpg: 448x640 (no detections), 6.9ms Speed: 1.1ms preprocess, 6.9ms inference, 0.4ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000076.jpg: 448x640 1 submissiveness, 6.4ms Speed: 1.0ms preprocess, 6.4ms inference, 0.9ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000017.jpg: 480x640 1 submissiveness, 7.9ms Speed: 1.7ms preprocess, 7.9ms inference, 0.9ms postprocess per image at shape (1, 3, 480, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000040.jpg: 448x640 1 curiosity, 6.6ms Speed: 3.1ms preprocess, 6.6ms inference, 0.9ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000099.jpg: 640x512 1 curiosity, 12.3ms Speed: 1.9ms preprocess, 12.3ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 512) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000054.jpg: 448x640 1 submissiveness, 8.1ms Speed: 2.1ms preprocess, 8.1ms inference, 1.0ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000091.jpg: 640x480 1 submissiveness, 11.3ms Speed: 1.5ms preprocess, 11.3ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 480) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000001.jpg: 448x640 1 curiosity, 8.9ms Speed: 1.9ms preprocess, 8.9ms inference, 1.0ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000025.jpg: 448x640 1 calmness, 10.2ms Speed: 1.5ms preprocess, 10.2ms inference, 1.0ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000090.jpg: 640x640 1 happiness, 13.8ms Speed: 2.3ms preprocess, 13.8ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000021.jpg: 640x448 1 submissiveness, 10.9ms Speed: 1.3ms preprocess, 10.9ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 448) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000098.jpg: 448x640 1 submissiveness, 10.2ms Speed: 1.3ms preprocess, 10.2ms inference, 1.2ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000029.jpg: 608x640 1 curiosity, 13.4ms Speed: 2.4ms preprocess, 13.4ms inference, 1.0ms postprocess per image at shape (1, 3, 608, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000058.jpg: 448x640 1 curiosity, 9.8ms Speed: 1.4ms preprocess, 9.8ms inference, 1.2ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000049.jpg: 448x640 1 submissiveness, 13.0ms Speed: 1.9ms preprocess, 13.0ms inference, 1.2ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000075.jpg: 448x640 1 curiosity, 13.0ms Speed: 1.3ms preprocess, 13.0ms inference, 1.5ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000005.jpg: 448x640 1 fear, 12.6ms Speed: 1.5ms preprocess, 12.6ms inference, 1.3ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000026.jpg: 480x640 1 curiosity, 18.6ms Speed: 1.3ms preprocess, 18.6ms inference, 1.1ms postprocess per image at shape (1, 3, 480, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000056.jpg: 448x640 1 submissiveness, 14.6ms Speed: 1.4ms preprocess, 14.6ms inference, 1.2ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000045.jpg: 448x640 1 happiness, 11.6ms Speed: 1.9ms preprocess, 11.6ms inference, 1.7ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000081.jpg: 448x640 1 fear, 17.3ms Speed: 1.4ms preprocess, 17.3ms inference, 1.4ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000027.jpg: 448x640 1 submissiveness, 13.0ms Speed: 1.4ms preprocess, 13.0ms inference, 1.3ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000082.jpg: 448x640 2 curiositys, 13.1ms Speed: 1.2ms preprocess, 13.1ms inference, 1.2ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000071.jpg: 640x448 1 happiness, 14.4ms Speed: 1.7ms preprocess, 14.4ms inference, 1.1ms postprocess per image at shape (1, 3, 640, 448) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000080.jpg: 448x640 1 happiness, 13.8ms Speed: 2.0ms preprocess, 13.8ms inference, 1.5ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000003.jpg: 640x448 1 submissiveness, 18.3ms Speed: 1.8ms preprocess, 18.3ms inference, 1.2ms postprocess per image at shape (1, 3, 640, 448) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000074.jpg: 448x640 1 submissiveness, 16.2ms Speed: 1.2ms preprocess, 16.2ms inference, 1.2ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000068.jpg: 448x640 1 submissiveness, 15.4ms Speed: 1.2ms preprocess, 15.4ms inference, 1.6ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000064.jpg: 640x448 1 curiosity, 17.9ms Speed: 1.5ms preprocess, 17.9ms inference, 1.1ms postprocess per image at shape (1, 3, 640, 448) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000078.jpg: 640x480 1 curiosity, 17.2ms Speed: 1.8ms preprocess, 17.2ms inference, 1.9ms postprocess per image at shape (1, 3, 640, 480) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000061.jpg: 640x544 1 happiness, 18.9ms Speed: 2.6ms preprocess, 18.9ms inference, 1.3ms postprocess per image at shape (1, 3, 640, 544) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000065.jpg: 448x640 1 happiness, 16.8ms Speed: 1.5ms preprocess, 16.8ms inference, 3.4ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000053.jpg: 384x640 1 happiness, 17.0ms Speed: 1.4ms preprocess, 17.0ms inference, 1.1ms postprocess per image at shape (1, 3, 384, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000034.jpg: 640x448 1 submissiveness, 17.0ms Speed: 2.0ms preprocess, 17.0ms inference, 2.0ms postprocess per image at shape (1, 3, 640, 448) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000032.jpg: 640x512 1 happiness, 19.5ms Speed: 2.1ms preprocess, 19.5ms inference, 1.1ms postprocess per image at shape (1, 3, 640, 512) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000087.jpg: 448x640 1 sadness, 1 submissiveness, 16.3ms Speed: 1.8ms preprocess, 16.3ms inference, 1.3ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000039.jpg: 640x448 1 submissiveness, 16.0ms Speed: 2.0ms preprocess, 16.0ms inference, 1.1ms postprocess per image at shape (1, 3, 640, 448) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000073.jpg: 448x640 1 submissiveness, 17.5ms Speed: 1.4ms preprocess, 17.5ms inference, 1.1ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000055.jpg: 448x640 1 curiosity, 25.9ms Speed: 1.3ms preprocess, 25.9ms inference, 2.5ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000084.jpg: 448x640 1 submissiveness, 7.4ms Speed: 1.3ms preprocess, 7.4ms inference, 1.5ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000088.jpg: 448x640 1 submissiveness, 6.8ms Speed: 1.2ms preprocess, 6.8ms inference, 1.0ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000096.jpg: 448x640 1 anger, 7.0ms Speed: 1.2ms preprocess, 7.0ms inference, 1.0ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000030.jpg: 576x640 1 curiosity, 10.0ms Speed: 1.9ms preprocess, 10.0ms inference, 1.1ms postprocess per image at shape (1, 3, 576, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000004.jpg: 512x640 1 happiness, 8.4ms Speed: 2.1ms preprocess, 8.4ms inference, 1.1ms postprocess per image at shape (1, 3, 512, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000092.jpg: 448x640 1 curiosity, 11.4ms Speed: 1.2ms preprocess, 11.4ms inference, 1.1ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000013.jpg: 448x640 1 submissiveness, 9.2ms Speed: 1.9ms preprocess, 9.2ms inference, 1.0ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000094.jpg: 448x640 1 curiosity, 2 submissivenesss, 6.5ms Speed: 1.7ms preprocess, 6.5ms inference, 1.0ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000009.jpg: 384x640 2 submissivenesss, 6.7ms Speed: 1.1ms preprocess, 6.7ms inference, 0.9ms postprocess per image at shape (1, 3, 384, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000057.jpg: 448x640 1 calmness, 9.2ms Speed: 2.6ms preprocess, 9.2ms inference, 1.9ms postprocess per image at shape (1, 3, 448, 640) image 1/1 C:\Users\awast\source\repos\Dog-Emotion\notebooks\..\portraits_dog\000035.jpg: 448x640 (no detections), 6.6ms Speed: 1.3ms preprocess, 6.6ms inference, 0.5ms postprocess per image at shape (1, 3, 448, 640)